import React, { Component } from "react";
import { Switch, Route, Link } from "react-router-dom";
import ChildRoute from "./ChildRoute/ChildRoute"; // 组件渲染 就可以 首字母大写

class child extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
  
    console.log(this.props,this.props.routes, "props");
    console.log(this.props, "this.props.location.query======== ");
    return (
      <div>
       
        <Link to={{ pathname: "/child/childRoute" }}>childRoute嵌套路由</Link>
        <Switch>
          <Route path={"/child/childRoute"} component={ChildRoute} />
        </Switch>
      </div>
    );
  }
}

export default child;
